package yunwo.cn.yzstation.presenter;

import yunwo.cn.yzstation.api.IinventoryActivityView;
import yunwo.cn.yzstation.api.IiventoryActivityModel;
import yunwo.cn.yzstation.base.BasePresenter;
import yunwo.cn.yzstation.bean.InventoryBean;
import yunwo.cn.yzstation.model.InventoryActivityModel;
import yunwo.cn.yzstation.view.activity.InventoryActivity;

/**
 * Created by lao on 2017/9/16.
 */

public class InventoryActivityPersenter extends BasePresenter<IinventoryActivityView> implements IiventoryActivityModel {
    InventoryActivity inventoryActivity;
    IinventoryActivityView iinventoryActivityView;
    private final InventoryActivityModel mInventoryActivityModel;

    public InventoryActivityPersenter(InventoryActivity inventoryActivity, IinventoryActivityView iinventoryActivityView) {
       attachView(iinventoryActivityView);
        this.inventoryActivity = inventoryActivity;
        this.iinventoryActivityView = iinventoryActivityView;
        mInventoryActivityModel = new InventoryActivityModel(inventoryActivity, this);
    }

    public void SearchOrder(String Orderstate, String condition,String data) {
        mInventoryActivityModel.SearchOrder(Orderstate, condition,data);
    }

    @Override
    public void SearchOrderSuccess(InventoryBean.DataBean dataBean, String orderstate) {
        iinventoryActivityView.SearchOrderSuccess(dataBean, orderstate);
    }
}
